Contributions are used at own risk, remember do a backup at your files.

Krika news v1.0 desing and tested in version 2.2ms2
Krika news v2.0 It is tested in version 2.2rc2a
Krika news v3.0 It is adapted to version 2.3.4


Krika News v1.1 by nicko107
-----------------------------------------------------------------
Date created: 09/29/2006
 - Added Tiny_mce wysiwig HTML editor based in contribution:
*TinyMCE WYSIWYG HTML EDITOR by Sputnik77
http://www.oscommerce.com/community/contributions,4563
(that contribution replace all textareas of catalog by the tiny_mce editor.
Thanks for this great contribution!)
Which this editor can published more easy the content of news 
in Krika News module in admin section.
Some browser navigators have disable the javascripts and dont 
display this editor, can enable it in options of your browser only for 
admin. In the case that are disable javascript only display in textarea mode
without Tiny_mce editor.
 - Rewriter of instrucctions.


Krika News v2.0 by reflex-ocasion
-----------------------------------------------------------------
Date created: 08/29/2013
 - Corrected a few mistakes, including you resized the browser causing the mistake of thinking it was a popup window closing and losing all the sessions that we had open at the time.


Krika News v3.0 by reflex-ocasion
-----------------------------------------------------------------
Date created: 07/31/2015
 - adapted for version 2.3.x

-----------------------------------------------------------------

This contribution add a new module for news that edit and published in admin section
Have the Tiny_mce Wysiwyg HTML Editor installed.


SUPPORT FORUM:
http://forums.oscommerce.com/topic/230309-contribution-krika-news-v11/




	INSTALLATION:


------------------------------------------------------


 	STEPS FOR ADMIN FILES


------------------------------------------------------

----------------------------------------

1.- Edit language files

----------------------------------------

OPEN file:

catalog/admin/includes/languages/english.php

ADD this line:

define('BOX_TOOLS_NEWS', 'Edit Cover');



IF YOU HAVE OTHER LANGUAGES IN YOUR CATALOG DO THE SAME 
FOR THATS LANGUAGE FILES:


OPEN file:

catalog/admin/includes/languages/espanol.php 

ADD this line:

define('BOX_TOOLS_NEWS', 'Editar portada');



OPEN file:

catalog/admin/includes/languages/german.php

ADD this line:

define('BOX_TOOLS_NEWS', 'Bearbeiten Abdeckung');



OPEN file:

catalog/admin/includes/languages/french.php

ADD this line:

define('BOX_TOOLS_NEWS', 'Modifier couvercle');



OPEN file:

catalog/admin/includes/languages/italian.php 

ADD this line: 

define('BOX_TOOLS_NEWS', 'Modifica coperchio');



OPEN file:

catalog/admin/includes/languages/portugues.php 

ADD this line: 

define('BOX_TOOLS_NEWS', 'Editar capa');


----------------------------------------

2.- FILENAMES.php

----------------------------------------

OPEN file:

catalog/admin/includes/filenames.php

ADD this line: 

define('FILENAME_EDIT_NEWS', 'edit_news.php');


----------------------------------------

3.- UPLOAD files the next files of contribution:

----------------------------------------

- FOR ADMIN:

catalog/admin/edit_news.php
catalog/admin/form_noticia.php
catalog/admin/action_news.php
catalog/admin/includes/languages/espanol/edit_news.php
catalog/admin/includes/languages/english/edit_news.php
catalog/admin/includes/languages/german/edit_news.php

--- If you have other language upload edit_news.php file 
to directory of that language.
Note: the files arent translated all.
Note 2: the file edit_news.php have the modifications to 
have the Tiny_mce editor in Edit news in admin.


- FOR CATALOG:

NOTE: If you want to use the scroll version for news module 
upload the file incluye in folder version_scroll:
version_scroll/catalog/includes/modules/news.php
(version created by Pablo Encabo www.plasticoymetal.com)
To use the version without scroll upload the version include 
with the others files of folder catalog:

catalog/includes/modules/news.php

upload the news txt files:

catalog/Espanol_news.txt
catalog/English_news.txt
catalog/Deutsch_news.txt

*** The name of this files depend of names of languages that you 
have define in admin section in:
admin >> Localization >> LAnguages
see step 7 for more info.


----------------------------------------

4.- DOWNLOAD tiny_mce 

    Official site: tinymce.moxiecode.com/

----------------------------------------

 - descomprime this file and find the folder tiny_mce:

tinymce/jscripts/tiny_mce/

only this folder tiny_mce upload to admin directory:

catalog/admin/tiny_mce/



Note for upadtes of tiny_mce:
when appear a new version or update of tiny_mce in 
tinymce.moxiecode.com/ can update your editor uploading 
the tiny_mce folder, replace this folder in your catalog 
with the new. 


----------------------------------------

5.- TOOLS.PHP

----------------------------------------

OPEN file:

catalog/admin/includes/boxes/tools.php

FIND:

      array(
        'code' => FILENAME_DEFINE_LANGUAGE,
        'title' => BOX_TOOLS_DEFINE_LANGUAGE,
        'link' => tep_href_link(FILENAME_DEFINE_LANGUAGE)
      ),


ADD AFTER:

      array(
        'code' => FILENAME_EDIT_NEWS,
        'title' => BOX_TOOLS_NEWS,
        'link' => tep_href_link(FILENAME_EDIT_NEWS)
      ),





------------------------------------------------------


 	STEPS INSTALL IN CATALOG FILES


------------------------------------------------------

----------------------------------------

6.- INDEX.PHP

----------------------------------------

OPEN file:

catalog/index.php

FIND:

	include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS);
	include(DIR_WS_MODULES . FILENAME_UPCOMING_PRODUCTS);


ADD BEFORE:

	include(DIR_WS_MODULES . FILENAME_NEWS);


----------------------------------------

7.- INDEX.PHP OF LANGUAGE DIRECTORIES: 

----------------------------------------

7.1 OPEN file:

catalog/includes/languages/english/index.php

ADD before the last ?> tag, the next:


/*here indicate the name of news file, in case that it not exist then create it: 'Yourlaguange_news.txt' 
Remember to used capital letter for the firts charapter. In Edit news in admin can see the name of file to create. Its depend of language installed in catalog. */

$news_text =( implode ('', file( 'English_news.txt' ) ) ); 

//here define the text of news in your language
define('TEXT_NEWS', $news_text );



---------

***NOTE: the name of the this files must be the same of 
laguange names used in admin in:  
admin >> Localization >> Languages

the same listing in this page and followed the _news.txt

---------

Do the same for all language index.php of your catalog


7.2 OPEN file:

catalog/includes/languages/espanol/index.php

ADD before the last ?> tag, the next:


/*aqu debes indicar el nombre del archivo de texto de noticias, si no existe, debes crearlo, el nombre del archivo debe tener este formato: 'Tuidioma_news.txt' 
Recuerda poner en mayuscula la primera letra. Si tienes dudas ves al administrador de noticias y te indicar el nombre de los archivos que tienes que crear, segn los idiomas que tengas en la tienda */

$news_text =( implode ('', file( 'Espanol_news.txt' ) ) ); 

//aqu defines los textos en tu idioma
define('TEXT_NEWS', $news_text );



7.3 OPEN file:

catalog/includes/languages/german/index.php

ADD before the last ?> tag, the next:


/*here indicate the name of news file, in case that it not exist then create it: 'Yourlaguange_news.txt' 
Remember to used capital letter for the firts charapter. In Edit news in admin can see the name of file to create. Its depend of language installed in catalog. */

$news_text =( implode ('', file( 'Deutsch_news.txt' ) ) ); 

//here define the text of news in your language
define('TEXT_NEWS', $news_text );



----------------------------------------

8.- FILENAMES.PHP of CATALOG files:

----------------------------------------

OPEN file:

catalog/includes/filenames.php 

ADD:

  define('FILENAME_NEWS', 'news.php');



----------------------------------------

9.- ADMINISTRATION:

----------------------------------------

Go to admin section:

Admin >> Tools >>

Appear a new sub-menu called "Publish News"


In tha case of any error this page displayed the error 
and the solution.


You can see here are the content for each language 
and the Tiny_mce to modify or create new content.

Then click on send button to update the content.
Do the same for each news of each language.

For can publish content see the next step 10:

----------------------------------------

10.- CHMOD PERMISSIONS FOR FILES:

----------------------------------------

News files must have CHMOD 777

catalog/Espanol_news.txt
catalog/English_news.txt
catalog/Deutsch_news.txt



------------------------------------------------------------------------
------------------------------------------------------------------------
FINISH.


Module create by Fco Jess Martn de la Sierra Hdez.
www.infortronic.com 

added Tiny_mce wysiwyg editor by nicko107
with the contribution *TinyMCE WYSIWYG HTML EDITOR
http://www.oscommerce.com/community/contributions,4563
of Sputnik77.

correction browser resizing by reflex-ocasion

Adapted for version 2.3 by reflex-ocasion
